package com.blensmile.network;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.Response;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by Blensmile on 2017/3/16.
 */
public interface ApiService {

    @GET("user/get_info")
    Call<Map<String,Object>> get_user_info(@Query("device_id") String device_id, @Query("verify") String verify, @Query("user_id") String user_id);

    @FormUrlEncoded
    @POST("/user/register")
    Call<Map<String,Object>> userRegister(@Field("device_id") String device_id,
                      @Field("identity") String identity,
                      @Field("password") String password,
                      @Field("nickname") String nickname,
                      @Field("type") String type,
                      @Field("verification_code") String code,
                      @Field("lan_code") String lan_code,
                      Callback<Map<String,Object>> callback);

    @Multipart
    @POST("/minos")
    Call<Object> postVoice(@Part("os") String platform,
                   @Part("formid") String formId,
                   @Part MultipartBody.Part file,
                   Callback<Object> callback
                   );

}
